package com.zhanghe.study.design_pattern.command_pattern;

/**
 * @author zh
 * @date 2022/10/13 15:30
 */
public class ConcreteCommand implements Command{

    private Receiver receiver;

    public ConcreteCommand(Receiver receiver){
        this.receiver = receiver;
    }
    @Override
    public void execute() {
        // 调用接收者的执行方法
        receiver.action();
    }
}
